/**
 * @class common.base.main
 * @extends common.base.object
 * usercenter入口文件基类
 */
define(function (require) {
    var Base = require('common/base/object');

    return Base.extend({
        /**
         * 构造函数
         * @param  {Object} params 配置参数
         */
        initialize: function (params) {
            var _this = this;
            Base.prototype.initialize.apply(this, [params]);

            //全选反选
            $('.J_checkall').on('click', function () {
                $('.J_checkitem').prop('checked', this.checked);
                $('.J_checkall').prop('checked', this.checked);
            });
        },
        redirect: function (url, timeout) {
            if (_.isObject(url)) {
                url = _.U(url);
            }
            setTimeout(function () {
                window.location.href = url;
            }, timeout || 0);
        }
    });
});